package feeinterface.dao;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.ulwx.tool.DbUtils;

import feeinterface.modeldb.ServiceCo;


/**
 * 业务合作表
 * @author scj
 *
 */
public class ServiceCoDao {
	/**
	 * 根据合作ID获取业务合作
	 * @param CoID
	 * @return
	 * @throws Exception
	 */
	public static ServiceCo  getBy(int CoID)throws Exception{
		
		String sql = "SELECT * FROM ServiceCo WHERE ServiceCoSno=? AND ENABLE=1";
		Map<Integer, Object> map = new HashMap<Integer, Object>();
		map.put(1, CoID);
		List<ServiceCo> list = DbUtils.doQueryClass(null, ServiceCo.class,
				sql,map);
		if(list.size()>0){
			return list.get(0);
		}
		return null;
	}
}
